package com.freeter.modules.sys.service.impl;

import com.freeter.common.baseapi.IBaseApi;
import com.freeter.common.baseapi.vo.SysLogVo;
import com.freeter.modules.sys.entity.SysLogEntity;
import com.freeter.modules.sys.service.SysLogService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("baseApiService")
public class BaseApiImpl implements IBaseApi {

    @Autowired
    private SysLogService sysLogService;

    @Override
    public void insert(SysLogVo sysLog) {
        SysLogEntity sysLogEntity = new SysLogEntity();
        BeanUtils.copyProperties(sysLog,sysLogEntity);
        sysLogService.insert(sysLogEntity);
    }
}
